<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<%@include file="header.jsp"%>
</head>
<script>
	$(document).ready(function() {
		getUser(function () {getTaskById(${curTaskId});});
	});
	
	function completeTask(task) {
		
		var form = fillFrom();
		$.ajax({
			url : proxyURL,
			data : {
				url : wfServiceUrl + "/task/" + task.id + "/complete",
				id: task.id,
				name: task.name,
				processID: task.processInstanceId,
				assignee: task.assignee,
				createTime: task.createTime,
				description: ((task.description == null) ? '' : task.description),
				dueDate: ((task.dueDate == null) ? '' : task.dueDate),
				priority: task.priority,
				completeUser: user,
				form: $.param(form),
				method: 'PUT',
				user : user
			},
			type : 'POST',
			success : function(res) {
				window.location.href = "${pageContext.request.contextPath}/mvc/task";
			}
		});
	}
</script>
<body>
<%@include file="sideNav.jsp"%>
<div id="dbTaskListItemDetail"></div>
</body>
</html>
